// /////////////////////////////////////////////////////////////////////////////
//
// Name:            AssetProcessor.cpp
// Author:          Michael Bartsch (ZCCdark203)
//
// Desc :           The AssetProcessor class is responsible for processing all
//                  assets in a sub-directory of an AssetGroup. Behaviour for
//                  specific assets is implemented by deriving from the
//                  AssetProcessor class.
//
// License:         Copyright (C) 2009 Michael Bartsch and Contributors
//
//                  This program is free software: you can redistribute it
//                  and/or modify it under the terms of the zlib/libpng License.
//                  See main.cpp for conditions of distribution and use.
//
// /////////////////////////////////////////////////////////////////////////////

// Include files
#include "AssetProcessor.h"


// AssetProcessor class
// AssetProcessor constructor.
AssetProcessor::AssetProcessor(AssetGroup *parent, const std::string &baseName)
: pParent(parent), mBaseName(baseName)
{
    if(pParent != NULL)
      pParent->grab();
}

// AssetProcessor deconstructor.
AssetProcessor::~AssetProcessor()
{
    if(pParent != NULL)
      pParent->drop();
}

// Returns the base name.
const std::string& AssetProcessor::getBaseName() const
{
    return mBaseName;
}

// Gets the parent of this processor.
AssetGroup* AssetProcessor::getParent() const
{
    return pParent;
}

// The following methods are dummy methods, which are needed to prevent problems
// with binding them to AngelScript.
// Loads all assets with the give name.
bool AssetProcessor::loadAsset(const std::string &fileName)
{
    return false;
}

// Loads all assets.
void AssetProcessor::loadAssets()
{
}

// Reloads the asset with the given filename.
bool AssetProcessor::reloadAsset(const std::string &fileName)
{
    return false;
}

// Reloads all assets.
void AssetProcessor::reloadAssets()
{
}

// Removes the asset with the given filename.
bool AssetProcessor::removeAsset(const std::string &fileName)
{
    return false;
}

// Removes all assets.
void AssetProcessor::removeAssets()
{
}

// End of File
